<!DOCTYPE html>
<html lang="en">
<head>
    {% load staticfiles %}
    <meta charset="UTF-8">
    <title>Datatable Demo</title>
    <link rel="stylesheet" href="{% static 'datatables-1.10.13/media/css/dataTables.bootstrap.min.css' %}">
</head>
<body>

<div>
    <table class="table table-striped table-hover table-bordered NoNewline" id="table" cellspacing="0" width="100%">
        <thead>
        <tr>
            <th title="name"></th>
            <th title="gender"></th>
            <th title="birth"></th>
            <th title="session"></th>
            <th title="class"></th>
            <th title="name">...</th>
        </tr>
        </thead>
        <tbody>

        </tbody>
    </table>
</div>

<script type="text/javascript" src="{% static 'jquery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'datatables-1.10.13/media/js/jquery.dataTables.min.js' %}"></script>
<script rel="text/javascript" href="{% static 'datatables-1.10.13/media/js/dataTables.bootstrap.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/common.js' %}"></script>

<script>
    $(document).ready(function () {

        initDatatable();
    });

    function initDatatable() {
        mytable = initDataTable("#table", {
            "ajax": {
                url: "{% url 'student_retrieve' %}",
                "dataSrc": "data",
                "type": "POST",
                "data": function () {
                    return {
                        "p_sts": $('#select_sts').val(),
                        "workflow_id": $('#select_workflow').val(),
                        "batch_id": $('#select_batch').val()
                    };
                },
            },
            "select": {
                style: 'multi',
                selector: 'td:first-child'
            },
            "fontAllSelect": true,
            "dataTableName": 'mytable'
        });
        $("#table").delegate(".tab_confirm", "click", function () {
            var fund_id = $(this).attr("param");
            var ret = confirm("确认资金已发放吗？");

            if (ret == true) {
                confirmFund(fund_id);
            }
        });

    }


</script>

</body>
</html>